<?php
defined('BASEPATH') OR exit('No direct script access allowed');

class Usernum_model extends Xt_model {

	protected $mTable = 'user_num';
	protected $mPkId = 'userid';

	public function get_info_by_id($id, $fields='*')
	{
		return $this->get_by_id($id, $fields);
	}

        
	// 根据userId获取
	public function get_info_by_userid($userId)
	{
    	if (is_array($userId)) {
        	$where = $userId; 
    	} else {
        	$where = array(
            	'userid'=>$userId
        	);
    	}
    	return $this->get_by_where($where);
	}
	
}